Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds the ability to create in-memory nodes (python nodes) with a reloadable uvicorn server. Instead of adding a notebook, adding some small code snippets here for local testing.
The way to run servers is to use
start_reloadable_server
as an alternative tosy.orchestra.launch
(it returns as NodeHandle)Right now this only takes a few of the import arguments from
sy.orchestra.launch
(name: str, node_type: str, node_side_type: str, port: int, processes: int, local_db: bool, reset: bool
) but not all.Test login
Test enclave login which should give a SyftError preventing admin logging into Enclaves.
Then comes the magic to check the reloading in action. Comment out these lines from user_service.py to allow admin login into Enclaves as well. And just rerun the last cell and it should allow the login!
Additional Notes
canada_node.land()
to shut the server or usestop_all_reloadable_servers()
to shutdown/land all servers.Thanks @itstauq!